import tkinter as tk
from logger import Logger
from validator import VerificationState
from gui import create_main_gui
from bta_processor import process_csv_files


def main():
    log_file = "application_log.txt"
    logger = Logger(log_file)

    verification_state = VerificationState(log_file)
    if verification_state.check_license():
        create_main_gui(logger)
    else:
        logger.log("授权验证失败，程序终止")
        exit(1)


if __name__ == "__main__":
    main()